package com.aiyige.im.action;

import com.aiyige.im.model.attachment.SubjectAttachment;
import com.netease.nim.uikit.business.session.actions.BaseAction;
import com.netease.nimlib.sdk.msg.MessageBuilder;
import com.netease.nimlib.sdk.msg.model.IMMessage;

public class SubjectAction extends BaseAction {

    /**
     * 构造函数
     *
     * @param iconResId 图标 res id
     * @param titleId   图标标题的string res id
     */
    protected SubjectAction(int iconResId, int titleId) {
        super(iconResId, titleId);
    }


    @Override
    public void onClick() {
        SubjectAttachment attachment = new SubjectAttachment();
        IMMessage message = MessageBuilder.createCustomMessage(
                getAccount(), getSessionType(), "我是夏超", attachment
        );
        sendMessage(message);
    }
}